import request from '@/utils/request'
import course from './course'

export default {
  addCourseInfo(courseInfo) {
    return request({
      url: `/eduService/course/addCourseInfo`,
      method: 'post',
      data: courseInfo
    })
  },
  getTeacherList() {
    return request({
      url: `/eduService/edu-admin/findAll`,
      method: 'get'
    })
  },
  getCourseInfoById(courseId) {
    return request({
      url: `/eduService/course/getCourseInfo/${courseId}`,
      method: 'get'
    })
  },
  updateCourseInfo(courseInfo) {
    return request({
      url: `/eduService/course/updateCourseInfo`,
      method: 'post',
      data: courseInfo
    })
  },
  getCoursePublishInfoById(id) {
    return request({
      url: `/eduService/course/getPublishCourseInfo/${id}`,
      method: 'get'
    })
  },
  publishCourse(id) {
    return request({
      url: `/eduService/course/publishCourse/${id}`,
      method: 'post'
    })
  },
  getListCourse() {
    return request({
      url: '/eduService/course/CourseList',
      method: 'get'
    })
  },
  getCourseListPage(current, limit, courseQuery) {
    return request({

      url: `/eduService/course/courseListCondition/${current}/${limit}`,
      method: 'post',
      data: courseQuery
    })
  },
  deleteCourseId(id) {
    return request({

      url: `/eduService/course/${id}`,
      method: 'delete',
    })
  }
}
